#!/bin/bash

export GO111MODULE=on
export GOPROXY=https://goproxy.cn

go version

rm -rf $outPath
mkdir $outPath

#source /root/.profile
GOGS_EXE=biliMiddleware

go build -o $GOGS_EXE

chmod +x $GOGS_EXE
mv $GOGS_EXE $outPath/

cp ./scripts/config_prod.toml $outPath/config.toml
cp ./scripts/$GOGS_EXE.service $outPath/$GOGS_EXE.service

